import { rsaEncrypt, rsaDecrypt } from '@/encrypt/rsa.js';

const publicKey = `-----BEGIN PUBLIC KEY-----
...你的公钥内容...
-----END PUBLIC KEY-----`;

const privateKey = `-----BEGIN PRIVATE KEY-----
...你的私钥内容...
-----END PRIVATE KEY-----`;

const text = 'hello world';
const encrypted = rsaEncrypt(publicKey, text);
console.log('加密后：', encrypted);

const decrypted = rsaDecrypt(privateKey, encrypted);
console.log('解密后：', decrypted);